package com.ithuaxin.array;

import com.ithuaxin.identifier.Sum;
import com.ithuaxin.identifier.Sum3;

public class Test15 {
    public static void main(String[] args) {
        int[][] arr = {{22,66,44},{77,33,88},{25,45,65},{11,66,99}};
        int sum = 0;
        int sum5 = 0;
        int sum1 = 0;
        int sum2 = 0;
        int sum3 = 0;
        int sum4 = 0;
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                sum = sum + arr[i][j];
                sum5 = sum5 + arr[i][j];
            }
            if (i==0){
                sum1 = sum5;
                System.out.println("第一季度的营业额是："+sum1);
            }else if (i==1){
                sum2 = sum5;
                System.out.println("第二季度的营业额是："+sum2);
            }else if (i==2){
                sum3 = sum5;
                System.out.println("第三季度的营业额是："+sum3);
            }else if (i==3){
                sum4 = sum5;
                System.out.println("第四季度的营业额是："+sum4);
            }
        }
        System.out.println("全年的总营业额是："+sum);
    }
}
